﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using InterfaceComponents;
using Serialization;
using Microsoft.Xna.Framework.Media;
using Sirian.Serialization;


namespace GlobalGameClasses
{
    /// <summary>
    /// GlobalGameValues provides access to all variables/objects which are present all the time via its Values field.
    /// </summary>
    public class GlobalGameValues
    {

        private static GlobalGameValues _Values = new GlobalGameValues();

        public static GlobalGameValues Values
        {
            get { return _Values; }
        }

        public GraphicsDevice graphicsDevice;

        public int volume_soundEffect;

        public int volume_Music;

        public ISoundPlayer soundPlayer;

        public HUDWrapper<int> score;

        public Difficulty difficulty;

        public SpriteBatch spriteBatch;

        public List<Achievement> achievementsUnlocked;

        public StringContainer GlobalStrings;

        public GameTime gameTime;

        public LogWriter errorWriter;

        public const float SPEEDFACTOR = 0.1f;

        public const float GAMEFIELD_HEIGHT = 80f;

        public ContentCollection content = new ContentCollection();

        private GlobalGameValues()
        {
            score = new HUDWrapper<int>(new List<HUDComponent>());
            achievementsUnlocked = new List<Achievement>();
            soundPlayer = GlobalGameClasses.SirianSoundPlayer.GetSoundPlayer();
        }
    }
}

